package com.itheima.fanshe4;

import java.lang.annotation.Annotation;

public class Demo01 {
    public static void main(String[] args) throws Exception {
        Class clazz = Class.forName("com.itheima.fanshe4.Dancer");
        //获取父类对象
        Class babaClazz = clazz.getSuperclass();
        System.out.println(babaClazz);
        System.out.println("========");
        //获取接口
        Class[] interfaces = clazz.getInterfaces();
        for (Class anInterface : interfaces) {
            System.out.println(anInterface);
        }

        //获取注解
        Annotation[] annotations = clazz.getAnnotations();
        for (Annotation annotation : annotations) {
            System.out.println(annotation);
        }
    }

}
